gdk: Remove supports_native_bg on WindowImplIface
authorBenjamin Otte <otte@redhat.com>
Sun, 15 Aug 2010 01:27:30 +0000 (03:27 +0200)
committerBenjamin Otte <otte@redhat.com>
Sun, 26 Sep 2010 13:03:00 +0000 (15:03 +0200)
This will not be TRUE for anything anymore, once we fix background
handling.

gdk/gdkwindow.c
gdk/gdkwindowimpl.h
gdk/x11/gdkwindow-x11.c

index 9fe481000a674109b38519f3ba6408f191f008d0..814c4117775f28a3c949ba3cc80d8e308fa9de26 100644 (file)
@@ -3812,28 +3812,6 @@ gdk_window_clear (GdkWindow *window)
                         width, height);
 }
 
-/* TRUE if the window clears to the same pixels as a native
-   window clear. This means you can use the native window
-   clearing operation, and additionally it means any clearing
-   done by the native window system for you will already be right */
-static gboolean
-clears_as_native (GdkWindowObject *private)
-{
-  GdkWindowObject *next;
-
-  next = private;
-  do
-    {
-      private = next;
-      if (gdk_window_has_impl (private))
-       return TRUE;
-      next = private->parent;
-    }
-  while (private->bg_pixmap == GDK_PARENT_RELATIVE_BG &&
-        next && next->window_type != GDK_WINDOW_ROOT);
-  return FALSE;
-}
-
 static void
 gdk_window_clear_region_internal (GdkWindow *window,
                                  cairo_region_t *region)
@@ -4842,9 +4820,7 @@ gdk_window_invalidate_maybe_recurse_full (GdkWindow       *window,
         for window backgrounds */
       if (private->event_mask & GDK_EXPOSURE_MASK ||
          clear_bg == CLEAR_BG_ALL ||
-         (clear_bg == CLEAR_BG_WINCLEARED &&
-          (!clears_as_native (private) ||
-           !GDK_WINDOW_IMPL_GET_IFACE (private->impl)->supports_native_bg)))
+         clear_bg == CLEAR_BG_WINCLEARED)
        impl_window_add_update_area (impl_window, visible_region);
     }
 
index fcb8ba235e92644719b0cf75a829c5d37ec7445e..ac8b7ca294f7975a03d6c2ed0884ec2834784d17 100644 (file)
@@ -143,7 +143,6 @@ struct _GdkWindowImplIface
   void         (* destroy)              (GdkWindow       *window,
                                         gboolean         recursing,
                                         gboolean         foreign_destroy);
-  gboolean     supports_native_bg;
 };
 
 /* Interface Functions */
index a505da77e2f5651a1bb557c7c68cb83567bec427..7978532893b9ff3055032b916e5ed1490ed241b5 100644 (file)
@@ -5464,7 +5464,6 @@ gdk_window_impl_iface_init (GdkWindowImplIface *iface)
   iface->queue_antiexpose = _gdk_x11_window_queue_antiexpose;
   iface->translate = _gdk_x11_window_translate;
   iface->destroy = _gdk_x11_window_destroy;
-  iface->supports_native_bg = TRUE;
 }
 
 static Bool